#ifndef _ReadDatem_members_H_
#define _ReadDatem_members_H_
private: 
// initializer -- this is called before the first call to function
// 'void ReadDatem(char const* buffer, const unsigned buflen)'
  /* inline*/ void ReadDatem_initialize(void) {
}

// finalizer -- this is called after the last call to function
// 'void ReadDatem(char const* buffer, const unsigned buflen)'
  /* inline*/ void ReadDatem_finalize(void) {
}

// parser -- this is called every time a new buffer is available
  /* inline*/ void ReadDatem(char const* buffer, const unsigned buflen) {
    // if this method's implementation is _simple_ enough,
    // you should inline it here
    // SPCDBG(L_DEBUG, "received a buffer with " << buflen << " bytes to be parsed","dpsop");
    // create a new tuple object
	OPort0_t otuple;
	int year = 0;
	int month = 0;
	int day = 0;
	int starthr = 0;
	int duration = 0;
	float latitude = 0.0;
	float longitude = 0.0;
	double concentration = 0.0;
	
		sscanf(buffer, "%d %d %d %d %d %f %f %lE %*d", 
				&year, &month, &day, &starthr, &duration, 
				&latitude, &longitude, &concentration);

		otuple._yr = year;
		otuple._mo = month;
		otuple._dy = day;
		otuple._shr = starthr;
		otuple._dur = duration;
		otuple._lat = latitude;
		otuple._lon = longitude;
		otuple._con = concentration;
		submitTuple0(otuple);

    // perform buffer parsing (buffer size is given by buflen)
    // submit new tuple for downstream processing
    // submitTuple0(otuple);
}

// your additional members -- remember to choose 'private', 'protected',
// or 'public' as appropriate
#endif
